//
//  LSZHeaderValueTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/6/7.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZHeaderValueTableViewCell.h"

@implementation LSZHeaderValueTableViewCell

-(id)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        UIView * viewBack = [[UIView alloc]init];
        viewBack.backgroundColor = redUIColor;
        viewBack.userInteractionEnabled = YES;
        [viewBack.layer setMasksToBounds:YES];
        [self addSubview:viewBack];

        self.labelRemainingValue = [[UILabel alloc]init];
        self.labelRemainingValue.textColor = [UIColor whiteColor];
        [viewBack addSubview:self.labelRemainingValue];

        UILabel * labelNote = [[UILabel alloc]init];
        labelNote.textColor = [UIColor whiteColor];
        labelNote.text = @"连续签到7天,领取福音大礼包";
        [viewBack addSubview:labelNote];

        self.butList = [[UIButton alloc]init];
        [self.butList.layer setMasksToBounds:YES];
        [self.butList.layer setBorderWidth:1];
        [self.butList setTitle:@"签到排行榜" forState:UIControlStateNormal];
        [self.butList.layer setBorderColor:[UIColor whiteColor].CGColor];
        [viewBack addSubview:self.butList];

        if (ScreenWidth == 320) {
            //5
            self.labelRemainingValue.font = FONT_(13.5);
            labelNote.font = FONT_(13.5);
            self.butList.titleLabel.font = FONT_(13.5);

            viewBack.frame = CGRectMake(10,10,ScreenWidth-20,110);
            [viewBack.layer setCornerRadius:3];
            self.labelRemainingValue.frame = CGRectMake(12,18,viewBack.frame.size.width-12,22);
            labelNote.frame = CGRectMake(12,CGRectGetMaxY(self.labelRemainingValue.frame)+5,viewBack.frame.size.width-12,17);

            self.butList.frame = CGRectMake(viewBack.frame.size.width-15-92,viewBack.frame.size.height-28-10,92,28);
            [self.butList.layer setCornerRadius:14];

        }else if(ScreenWidth == 375){
            // 6 7
            self.labelRemainingValue.font = FONT_(14);
            labelNote.font = FONT_(14);
            self.butList.titleLabel.font = FONT_(14);

            viewBack.frame = CGRectMake(13,13,ScreenWidth-26,114);
            [viewBack.layer setCornerRadius:4];
            self.labelRemainingValue.frame = CGRectMake(15,20,viewBack.frame.size.width-15,24);
            labelNote.frame = CGRectMake(15,CGRectGetMaxY(self.labelRemainingValue.frame)+5,viewBack.frame.size.width-15,19);
            self.butList.frame = CGRectMake(viewBack.frame.size.width-15-95,viewBack.frame.size.height-30-10,95,30);
            [self.butList.layer setCornerRadius:15];

         }else {
            //plus
             self.labelRemainingValue.font = FONT_(14.5);
             labelNote.font = FONT_(14.5);
             self.butList.titleLabel.font = FONT_(14.5);

             viewBack.frame = CGRectMake(15,15,ScreenWidth-30,118);
             [viewBack.layer setCornerRadius:5];
             self.labelRemainingValue.frame = CGRectMake(17,22,viewBack.frame.size.width-17,26);
             labelNote.frame = CGRectMake(17,CGRectGetMaxY(self.labelRemainingValue.frame)+5,viewBack.frame.size.width-17,21);

             self.butList.frame = CGRectMake(viewBack.frame.size.width-15-97,viewBack.frame.size.height-32-10,97,32);
             [self.butList.layer setCornerRadius:16];

         }
    }
    return self;
}

@end
